package org.com.coolfish.common.database.service;

import java.math.BigDecimal;
import org.com.coolfish.common.database.entity.KuyuCardMoney;
import org.com.coolfish.common.database.repository.KuyuCardMoneyRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class KuyuCardMoneyService {
	@Autowired
	private KuyuCardMoneyRepository repository;

	@Transactional
	public void changeCardMoney(BigDecimal money,Integer cardid) {
		repository.changeCardMoney(money,cardid);
	}
	
	@Transactional
    public void save(KuyuCardMoney kuyu) {
        repository.saveAndFlush(kuyu);
    }

}
